# 打印5*5的矩形形
# 设定长、宽
width = 5
height = 5

for i in range(height):
    for j in range(width):
        print('*', end=' ')
    print()
print('-------------')


# 打印直角三角形
# 设置边长
length = 5
for i in range(length + 1):
    for j in range(i):
        print('*', end=' ')
    print()
print('-------------')
# 反直角三角形
length = 5
for i in range(length, 0, -1):
    for j in range(i):
        print('*', end=' ')
    print()
print('-------------')

# 等腰三角形
for i in range(length):
    # print('  ' * (length - i - 1), end='')
    for j in range(length - i - 1):
        print(' ', end=' ')
    for k in range(2 * i + 1):
        print('*', end=' ')
    print()
